 <form id="myForm" action="<?php echo $current?>newdatacustomer" class="form-horizontal" role="form">
<h2>ข้อมูลทั่วไป</h2>
	<br />
	<?

	echo $genhtml -> getTextBox("รหัสพนักงาน", "UserID");
	echo $genhtml -> getTextBox("รหัสเซลล์", "SALES_NO");
	echo $genhtml -> getTextBox("ชื่อพนักงาน", "SALES_NAME");
	echo $genhtml -> getTextBox("อีเมล์", "EMAIL");
	$role = array();
	$role[] = array("RoleName"=>"Admin");
	$role[] = array("RoleName"=>"Sales");
	
	echo $genhtml->getComboBox("สิทธิ์การใช้งาน", "ROLE", $role, "RoleName", "RoleName");
	echo $genhtml -> getTextBox("โทรศัพท์", "TELEPHONE");
	?>
	<h2>ข้อมูลการเข้าสู่ระบบ</h2>
	<br />
	<?
	echo $genhtml -> getTextBox("Username", "Username");
	echo $genhtml -> getTextPassword("รหัสผ่าน", "Password");
	echo $genhtml -> getTextPassword("ยืนยันรหัสผ่าน", "Repassword");
	echo $genhtml -> getButton("submit", "CreateCustomer", "Create Customer", "info");
	
	
	/*
	echo $genhtml -> getText("ชื่อลูกค้า", "NAME");
	echo $genhtml -> getText("ที่อยู่", "ADDRESS");
	echo $genhtml -> getText("โทรศัพท์", "TELEPHONE");
	echo $genhtml -> getText("โทรสาร", "FAX");
	echo $genhtml -> getText("อีเมล์", "EMAIL");
	echo $genhtml -> getText("เลขทะเบียนเสียภาษี", "TAXID");
	echo $genhtml -> getText("วงเงิน", "CREDIT_LIMIT");
	echo $genhtml -> getText("วงเงินใช้ไป", "CREDIT_USED");
	echo $genhtml -> getText("วงเงินคงเหลือ", "CREDIT_LEFT");*/
	?>

	

	
</form>
<script type="text/javascript">
	$(function(){
		initNormalForm(function(data){
			if(data.flag=="true"){
				window.location.href= "<?php echo base_url()?>adminpanel/user/";
			}else{
				alert(data.message);
			}
		})
	})
</script>
